<?php
function getCate($cate){
    return \app\common\model\Cate::where('pid',$cate)->column('id');
}
function getVideo($id){
    $video = \app\common\model\CourseChapter::where('id',$id)->value('video');
    return base64_encode(file_get_contents(substr($video, 1)));
}

function getLearningVideo($id){
    $video = \app\common\model\Learn::where('id',$id)->value('video');
    return base64_encode(file_get_contents(substr($video, 1)));
}